<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>元素的显示模式</title>
    <style>
        a {
            width: 230px;
            height: 40px;
            background-color: #55585a;
            font-size: 14px;
            color: #fff;
            text-decoration: none;
            text-indent: 2em;
            /* heigth = line-height 可以实现文字垂直居中 */
            line-height: 40px;
            /* block：把行内元素转化为块元素 */
            display: block;
        }

        a:hover {
            background-color: #ff6700;
        }

        #nh {
            width: 50px;
            height: 50px;
            background-color: blue;
            /* inline：把块元素转化为行内元素 
            inline-block：转化为行内块元素
            */
            display: inline;
            background-color: aqua;
        }

        #imageId {
            /* width: 1000px; */
            height: 1000px;
            /* 
            默认情况为平铺
            repeat:平铺
            no-repear:非平铺 
            repear-x:沿着x轴平铺
            repear-y：沿着y轴平铺
            */
            background-repeat: no-repeat;
            /* 图片水平居中，垂直靠上 */
            background-position: center top;
            /*
            x 轴 20 
            y 轴 50
            background-position: 20px 50px; */
            /*
            scroll：滚动 
            fixed：图片固定
            */
            background-attachment: fixed;
            background: rgba(0, 0, 0, 0.2);
            background-image: URL(../../image/1.jpg);
        }
    </style>
</head>

<body>
    <div id="imageId">
        <a href="#">手机</a>
        <a href="#">电脑</a>
        <a href="#">电视</a>
        <a href="#">电灯</a>
        <a href="#">电机</a>
        <a href="#">电焊</a>

        <div id="nh">你好</div>
        背景图片
    </div>
</body>

</html>